<?php

use Illuminate\Support\Facades\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateDiseaseDictionariesTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('st_disease_dictionary', function (Blueprint $table) {
            $table->increments('id');
            $table->string('name', 64)->index()->comment('诊断名称');
            $table->string('icd')->default('')->comment('icd 编码');
            $table->unsignedInteger('sort')->default(0)->comment('排序');
            $table->unsignedInteger('doctor_id')->comment('添加人');
            $table->unsignedInteger('updated_by')->default(0)->comment('最后修改人, 关联user表');
            $table->softDeletes();
            $table->timestamps();
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('st_disease_dictionary');
    }
}
